------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\mrg19\Dropbox\matt\publications\jop6\replication\anes2016_analysis.log
  log type:  text
 opened on:  16 May 2022, 15:18:31

. #delimit ;
delimiter now ;
. *     ***************************************************************** *;
. *     ***************************************************************** *;
. *       File-Name:      anes2016_analysis.do                            *;
. *       Date:           May 14, 2022                                                                    *;
. *       Author:         MG                                                      *;
. *       Purpose:        Replicate results for Block, Golder, and Golder *;
. *                                               "Evaluating Claims of Intersectionality"                *;
. *                                               Journal of Politics                                                             *;
. *           Input File:     anes2016_small.dta                                  *;
. *       Output File:    none                                                    *;
. *       Data Output:    none                                            *;
.              *       Previous file:                                                                                     *;
. *       Machine:        desktop/laptop                                                  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *        Load data                                                      *;
. *     ****************************************************************  *;
. use "C:\Users\mrg19\Dropbox\matt\publications\jop6\replication\anes2016_small.dta", clear;

. *     ****************************************************************  *;
. *           Variable description                                                                *;
. *     ****************************************************************  *;
. desc;

Contains data from C:\Users\mrg19\Dropbox\matt\publications\jop6\replication\anes2016_small.dta
 Observations:         4,270                  
    Variables:            12                  16 May 2022 15:18
------------------------------------------------------------------------------------------------------------------------------------------------------------
Variable      Storage   Display    Value
    name         type    format    label      Variable label
------------------------------------------------------------------------------------------------------------------------------------------------------------
respondent_id   float   %9.0g                 respondent id
like_republican float   %46.0g     V162284    POST: CSES: 10pt scale: like-dislike Republican Party
age             float   %32.0g     V161267    PRE: Respondent age
male            byte    %8.0g                 1 male, 0 female
female          byte    %8.0g                 1 female 0 male
white           byte    %8.0g                 white, non-Hispanic
black           byte    %8.0g                 Black, non-Hispanic
no_highschool   float   %9.0g                 No high school
highschool      float   %9.0g                 high school, but not BA
undergrad       float   %9.0g                 undergrad BA AB BS
grad            float   %9.0g                 graduate degree
income          float   %46.0g     V161361x   PRE FTF CASI/WEB: Pre income summary
------------------------------------------------------------------------------------------------------------------------------------------------------------
Sorted by: 

. *     ****************************************************************  *;
. *       Drop respondents who are not white or black                                             *;
. *     ****************************************************************  *;
. keep if white==1 | black==1;
(835 observations deleted)

. *     ****************************************************************  *;
. *               Generate interaction term for gender and race                                   *;
. *     ****************************************************************  *;
. gen female_black = female*black;
(29 missing values generated)

. gen female_white = female*white;
(29 missing values generated)

. gen male_black = male*black;
(29 missing values generated)

. gen male_white = male*white;
(29 missing values generated)

. order respondent_id female male black white female_black female_white male_black male_white;

. *     ****************************************************************  *;
. *           Summary statistics                                                                                  *;
. *     ****************************************************************  *;
. sum;

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
respondent~d |      3,435    2765.305    1526.752          1       5090
      female |      3,406    .5364063     .498746          0          1
        male |      3,406    .4635937     .498746          0          1
       black |      3,435     .115575    .3197611          0          1
       white |      3,435     .884425    .3197611          0          1
-------------+---------------------------------------------------------
female_black |      3,406    .0692895    .2539831          0          1
female_white |      3,406    .4671169    .4989908          0          1
  male_black |      3,406    .0463887    .2103564          0          1
  male_white |      3,406    .4172049    .4931697          0          1
like_repub~n |      2,938     4.95371    3.032101          0         10
-------------+---------------------------------------------------------
         age |      3,362    50.69393    17.55246         18         90
no_highsch~l |      3,408    .0548709    .2277615          0          1
  highschool |      3,408    .5437207    .4981579          0          1
   undergrad |      3,408    .2362089    .4248143          0          1
        grad |      3,408    .1651995     .371415          0          1
-------------+---------------------------------------------------------
      income |      3,295    15.64401    8.043624          1         28

. sum like_republican;

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
like_repub~n |      2,938     4.95371    3.032101          0         10

. sum female;

    Variable |        Obs        Mean    Std. dev.       Min        Max
-------------+---------------------------------------------------------
      female |      3,406    .5364063     .498746          0          1

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Produce results from standard interaction model in Table 2              *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress like_republican female black female_black age;

      Source |       SS           df       MS      Number of obs   =     2,858
-------------+----------------------------------   F(4, 2853)      =     50.14
       Model |  1724.85994         4  431.214986   Prob > F        =    0.0000
    Residual |  24534.1785     2,853  8.59943167   R-squared       =    0.0657
-------------+----------------------------------   Adj R-squared   =    0.0644
       Total |  26259.0385     2,857  9.19112303   Root MSE        =    2.9325

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      female |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
       black |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
female_black |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
         age |   .0152335   .0031501     4.84   0.000     .0090567    .0214103
       _cons |   4.468863    .181446    24.63   0.000     4.113084    4.824641
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Calculate reported effects                                                                              *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Effect of being female among Whites                                                             *;
. *     ****************************************************************  *;
. lincom _b[female];

 ( 1)  female = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
------------------------------------------------------------------------------

. scalar women_whites = r(estimate);

. di women_whites;
-.04226008

. *     ****************************************************************  *;
. *               Effect of being female among Blacks                                                             *;
. *     ****************************************************************  *;
. lincom _b[female]+_b[female_black];

 ( 1)  female + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.071579   .3316002    -3.23   0.001    -1.721779   -.4213787
------------------------------------------------------------------------------

. scalar women_blacks = r(estimate);

. di women_blacks;
-1.0715791

. *     ****************************************************************  *;
. *               Effect of being Black among men                                                                 *;
. *     ****************************************************************  *;
. lincom _b[black];

 ( 1)  black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
------------------------------------------------------------------------------

. scalar blacks_men= r(estimate);

. di blacks_men;
-1.4995411

. *     ****************************************************************  *;
. *               Effect of being Black among women                                                               *;
. *     ****************************************************************  *;
. lincom _b[black]+_b[female_black];

 ( 1)  black + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -2.52886   .2208067   -11.45   0.000    -2.961817   -2.095903
------------------------------------------------------------------------------

. scalar blacks_women= r(estimate);

. di blacks_women;
-2.52886

. *     ****************************************************************  *;
. *               Interaction effect                                                                                              *;
. *     ****************************************************************  *;
. lincom _b[female_black];

 ( 1)  female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Create Figure 4 showing the conditional effects of gender and   *;
. *               race on Republican support in the 2016 US presidential                  *;
. *               elections.                                                                                                              *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress like_republican female black female_black age;

      Source |       SS           df       MS      Number of obs   =     2,858
-------------+----------------------------------   F(4, 2853)      =     50.14
       Model |  1724.85994         4  431.214986   Prob > F        =    0.0000
    Residual |  24534.1785     2,853  8.59943167   R-squared       =    0.0657
-------------+----------------------------------   Adj R-squared   =    0.0644
       Total |  26259.0385     2,857  9.19112303   Root MSE        =    2.9325

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      female |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
       black |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
female_black |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
         age |   .0152335   .0031501     4.84   0.000     .0090567    .0214103
       _cons |   4.468863    .181446    24.63   0.000     4.113084    4.824641
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Create a 5 x 2 matrix to store inputs for creating plot                 *;
. *     ****************************************************************  *;
. matrix plot = J(5, 2, .);

. matrix coln plot = estimate se;

. *     ****************************************************************  *;
. *               Obtain the point estimates and standard errors for the effects  *;
. *               shown in Figure 4 and place them in the matrix                                  *;
. *     ****************************************************************  *;
. lincom _b[female_black];

 ( 1)  female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
------------------------------------------------------------------------------

. matrix plot[1,1]=r(estimate);

. matrix plot[1,2]=r(se);

. lincom _b[female];

 ( 1)  female = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
------------------------------------------------------------------------------

. matrix plot[2,1]=r(estimate);

. matrix plot[2,2]=r(se);

. lincom _b[female]+_b[female_black];

 ( 1)  female + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.071579   .3316002    -3.23   0.001    -1.721779   -.4213787
------------------------------------------------------------------------------

. matrix plot[3,1]=r(estimate);

. matrix plot[3,2]=r(se);

. lincom _b[black];

 ( 1)  black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
------------------------------------------------------------------------------

. matrix plot[4,1]=r(estimate);

. matrix plot[4,2]=r(se);

. lincom _b[black]+_b[female_black];

 ( 1)  black + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -2.52886   .2208067   -11.45   0.000    -2.961817   -2.095903
------------------------------------------------------------------------------

. matrix plot[5,1]=r(estimate);

. matrix plot[5,2]=r(se);

. *     ****************************************************************  *;
. *               Produce the plot using coefplot                                                                 *;
. *     ****************************************************************  *;
. coefplot (matrix(plot[.,1]), se(plot[.,2]) offset(0) lwidth(thick) m(smcircle) 
>                 mfcolor("126 163 204") mlc("126 163 204") ciop(lcolor("126 163 204"))),  
>                 legend(off) xtitle("Effect Size", size(2.5)) levels(95) 
>                 xlab(-3 -2.5 -2 -1.5 -1 -0.5 0 0.5, tlcolor(black) labcolor(black) labsize(2.5))                                
>                 coeflabels(r1="Interaction Effect for Gender and Race" 
>                 r2="Effect of being Female among Whites" r3="Effect of being Female among Blacks"               
>                 r4="Effect of being Black among men" r5="Effect of being Black among women", 
>                 tlcolor(black) labcolor(black) labsize(2.5)) 
>                 yscale(noline) xscale(noline) mlabel format(%9.2f) mlabposition(12) 
>                 mlabgap(*2) mlabsize(2.5)  xline(0, lcolor(gray)) scheme(burd);

.                 graph export "C:\Users\mrg19\Dropbox\matt\publications\jop6\replication\fig4.pdf", replace;
file C:\Users\mrg19\Dropbox\matt\publications\jop6\replication\fig4.pdf saved as PDF format

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Calculate the values that go into Figure 5. These values show   *;
. *               the predicted values and the conditional effects of gender and  *;
. *               race on Republican support in the 2016 US presidential                  *;
. *               elections.                                                                                                              *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Start with the predicted values in the gray square.                             *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               40 year old White male                                                                                  *;
. *     ****************************************************************  *;
. margins, at(female=0 black=0 female_black=0 age=40);

Adjusted predictions                                     Number of obs = 2,858
Model VCE: OLS

Expression: Linear prediction, predict()
At: female       =  0
    black        =  0
    female_black =  0
    age          = 40

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   5.078202   .0917698    55.34   0.000      4.89826    5.258144
------------------------------------------------------------------------------

. lincom _b[_cons]+40*_b[age];

 ( 1)  40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   5.078202   .0917698    55.34   0.000      4.89826    5.258144
------------------------------------------------------------------------------

. scalar white_man40= r(estimate);

. di white_man40;
5.0782017

. *     ****************************************************************  *;
. *               40 year old White female                                                                                *;
. *     ****************************************************************  *;
. margins, at(female=1 black=0 female_black=0 age=40);

Adjusted predictions                                     Number of obs = 2,858
Model VCE: OLS

Expression: Linear prediction, predict()
At: female       =  1
    black        =  0
    female_black =  0
    age          = 40

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   5.035942   .0876324    57.47   0.000     4.864112    5.207771
------------------------------------------------------------------------------

. lincom _b[_cons]+_b[female]+40*_b[age];

 ( 1)  female + 40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   5.035942   .0876324    57.47   0.000     4.864112    5.207771
------------------------------------------------------------------------------

. scalar white_woman40= r(estimate);

. di white_woman40;
5.0359416

. *     ****************************************************************  *;
. *               40 year old Black male                                                                                  *;
. *     ****************************************************************  *;
. margins, at(female=0 black=1 female_black=0 age=40);

Adjusted predictions                                     Number of obs = 2,858
Model VCE: OLS

Expression: Linear prediction, predict()
At: female       =  0
    black        =  1
    female_black =  0
    age          = 40

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   3.578661   .2605026    13.74   0.000     3.067868    4.089453
------------------------------------------------------------------------------

. lincom _b[_cons]+_b[black]+40*_b[age];

 ( 1)  black + 40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   3.578661   .2605026    13.74   0.000     3.067868    4.089453
------------------------------------------------------------------------------

. scalar black_man40= r(estimate);

. di black_man40;
3.5786606

. *     ****************************************************************  *;
. *               40 year old Black female                                                                                *;
. *     ****************************************************************  *;
. margins, at(female=1 black=1 female_black=1 age=40);

Adjusted predictions                                     Number of obs = 2,858
Model VCE: OLS

Expression: Linear prediction, predict()
At: female       =  1
    black        =  1
    female_black =  1
    age          = 40

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
       _cons |   2.507082    .206474    12.14   0.000     2.102228    2.911935
------------------------------------------------------------------------------

. lincom _b[_cons]+_b[female]+_b[black]+_b[female_black]+40*_b[age];

 ( 1)  female + black + female_black + 40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   2.507082    .206474    12.14   0.000     2.102228    2.911935
------------------------------------------------------------------------------

. scalar black_woman40= r(estimate);

. di black_woman40;
2.5070816

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Now calculate the differences in predicted values. These                *;
. *               differences provide the other values in Figure 5. They are the  *;
. *               the same as the effects calculated previously.                                  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Effect of female among Whites or difference between White women *;
. *               White men                                                                                                               *;
. *     ****************************************************************  *;
. lincom (_b[_cons]+_b[female]+40*_b[age])-(_b[_cons]+40*_b[age]);

 ( 1)  female = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
------------------------------------------------------------------------------

. lincom _b[female];

 ( 1)  female = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of female among Blacks or difference between Black women *;
. *               and Black men                                                                                                   *;
. *     ****************************************************************  *;
. lincom (_b[_cons]+_b[female]+_b[black]+_b[female_black]+40*_b[age])-(_b[_cons]+_b[black]+40*_b[age]);

 ( 1)  female + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.071579   .3316002    -3.23   0.001    -1.721779   -.4213787
------------------------------------------------------------------------------

. lincom _b[female]+_b[female_black];

 ( 1)  female + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.071579   .3316002    -3.23   0.001    -1.721779   -.4213787
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of being Black among men or difference between Black men *;
. *               and White men                                                                                                   *;
. *     ****************************************************************  *;
. lincom (_b[_cons]+_b[black]+40*_b[age])-(_b[_cons]+40*_b[age]);

 ( 1)  black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
------------------------------------------------------------------------------

. lincom _b[black];

 ( 1)  black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of being Black among women or difference between Black   *;
. *               women and White women                                                                                   *;
. *     ****************************************************************  *;
. lincom (_b[_cons]+_b[female]+_b[black]+_b[female_black]+40*_b[age])-(_b[_cons]+_b[female]+40*_b[age]);

 ( 1)  black + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -2.52886   .2208067   -11.45   0.000    -2.961817   -2.095903
------------------------------------------------------------------------------

. lincom _b[black]+_b[female_black];

 ( 1)  black + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -2.52886   .2208067   -11.45   0.000    -2.961817   -2.095903
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Interaction effect                                                                                              *;
. *     ****************************************************************  *;
. * Difference between (i) the difference between Black women and White women and (ii) the difference between Black men and White men;
.   lincom ((_b[_cons]+_b[female]+_b[black]+_b[female_black]+40*_b[age])-(_b[_cons]+_b[black]+40*_b[age]))-((_b[_cons]+_b[female]+40*_b[age])-(_b[_cons]+40*
> _b[age]));

 ( 1)  female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
------------------------------------------------------------------------------

. * Difference between (i) the difference between Black women and Black men and (ii) the difference between White women and White men;
.  lincom ((_b[_cons]+_b[female]+_b[black]+_b[female_black]+40*_b[age])-(_b[_cons]+_b[black]+40*_b[age]))-((_b[_cons]+_b[female]+40*_b[age])-(_b[_cons]+40*_
> b[age]));

 ( 1)  female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
------------------------------------------------------------------------------

. * interaction term coefficient;
. lincom _b[female_black];

 ( 1)  female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Calculate the substantive effects reported in the paper.                *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Effect of being female among whites                                                             *;
. *     ****************************************************************  *;
. di (women_whites/white_man40)*100;
-.832186

. *     ****************************************************************  *;
. *               Effect of being female among blacks                                                             *;
. *     ****************************************************************  *;
. di (women_blacks/black_man40)*100;
-29.943579

. *     ****************************************************************  *;
. *               Effect of being black among men                                                                 *;
. *     ****************************************************************  *;
. di (blacks_men/white_man40)*100;
-29.528978

. *     ****************************************************************  *;
. *               Effect of being black among women                                                               *;
. *     ****************************************************************  *;
. di (blacks_women/white_woman40)*100;
-50.21623

. *     ****************************************************************  *;
. *               Interaction effect                                                                                              *;
. *     ****************************************************************  *;
. di women_blacks/women_whites;
25.356766

. di blacks_women/blacks_men;
1.6864227

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Show that effects and predicted values are identical if we use  *;
. *               the alternative interaction model                                                               *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress like_republican female_white male_black female_black age;

      Source |       SS           df       MS      Number of obs   =     2,858
-------------+----------------------------------   F(4, 2853)      =     50.14
       Model |  1724.85994         4  431.214986   Prob > F        =    0.0000
    Residual |  24534.1785     2,853  8.59943167   R-squared       =    0.0657
-------------+----------------------------------   Adj R-squared   =    0.0644
       Total |  26259.0385     2,857  9.19112303   Root MSE        =    2.9325

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
female_white |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
  male_black |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
female_black |   -2.57112   .2226159   -11.55   0.000    -3.007624   -2.134616
         age |   .0152335   .0031501     4.84   0.000     .0090567    .0214103
       _cons |   4.468863    .181446    24.63   0.000     4.113084    4.824641
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Interaction effect                                                                                              *;
. *     ****************************************************************  *;
. lincom _b[female_black]-_b[female_white]-_b[male_black];

 ( 1)  - female_white - male_black + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.029319   .3515646    -2.93   0.003    -1.718665   -.3399726
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of being female among Whites                                                             *;
. *     ****************************************************************  *;
. lincom _b[female_white];

 ( 1)  female_white = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -.0422601    .116899    -0.36   0.718    -.2714751    .1869549
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of being female among Blacks                                                             *;
. *     ****************************************************************  *;
. lincom _b[female_black]-_b[male_black];

 ( 1)  - male_black + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.071579   .3316002    -3.23   0.001    -1.721779   -.4213787
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of being Black among men                                                                 *;
. *     ****************************************************************  *;
. lincom _b[male_black];

 ( 1)  male_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |  -1.499541   .2746751    -5.46   0.000    -2.038123   -.9609593
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               Effect of being Black among women                                                               *;
. *     ****************************************************************  *;
. lincom _b[female_black]-_b[female_white];

 ( 1)  - female_white + female_black = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   -2.52886   .2208067   -11.45   0.000    -2.961817   -2.095903
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Predicted values based on the alternative interaction model     *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               40 year old White male                                                                                  *;
. *     ****************************************************************  *;
. lincom _b[_cons]+40*_b[age];

 ( 1)  40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   5.078202   .0917698    55.34   0.000      4.89826    5.258144
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               40 year old White female                                                                                *;
. *     ****************************************************************  *;
. lincom _b[_cons]+_b[female_white]+40*_b[age];

 ( 1)  female_white + 40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   5.035942   .0876324    57.47   0.000     4.864112    5.207771
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               40 year old Black male                                                                                  *;
. *     ****************************************************************  *;
. lincom _b[_cons]+_b[male_black]+40*_b[age];

 ( 1)  male_black + 40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   3.578661   .2605026    13.74   0.000     3.067868    4.089453
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *               40 year old Black female                                                                                *;
. *     ****************************************************************  *;
. lincom _b[_cons]+_b[female_black]+40*_b[age];

 ( 1)  female_black + 40*age + _cons = 0

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         (1) |   2.507082    .206474    12.14   0.000     2.102228    2.911935
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Show that our analysis is robust to including additional                *;
. *               controls for education and income.                                                              *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. regress like_republican female black female_black age highschool undergrad grad income;

      Source |       SS           df       MS      Number of obs   =     2,767
-------------+----------------------------------   F(8, 2758)      =     38.07
       Model |   2526.8917         8  315.861463   Prob > F        =    0.0000
    Residual |  22882.2258     2,758  8.29667359   R-squared       =    0.0994
-------------+----------------------------------   Adj R-squared   =    0.0968
       Total |  25409.1175     2,766  9.18623191   Root MSE        =    2.8804

------------------------------------------------------------------------------
like_repub~n | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      female |   .0054506    .117883     0.05   0.963    -.2256972    .2365984
       black |  -1.686481   .2774588    -6.08   0.000    -2.230529   -1.142433
female_black |  -.8864525   .3512069    -2.52   0.012    -1.575108   -.1977973
         age |   .0160456   .0031638     5.07   0.000      .009842    .0222492
  highschool |   .1908357   .2631563     0.73   0.468    -.3251676    .7068389
   undergrad |  -.4414844   .2821942    -1.56   0.118    -.9948177    .1118489
        grad |  -1.432385   .2971663    -4.82   0.000    -2.015076   -.8496945
      income |   .0146064   .0077001     1.90   0.058    -.0004921     .029705
       _cons |   4.422958   .3207377    13.79   0.000     3.794048    5.051868
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *     ****************************************************************  *;
. *               Replication Complete                                                                                    *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. log close;
      name:  <unnamed>
       log:  C:\Users\mrg19\Dropbox\matt\publications\jop6\replication\anes2016_analysis.log
  log type:  text
 closed on:  16 May 2022, 15:18:32
------------------------------------------------------------------------------------------------------------------------------------------------------------
